{extend name="wap/default/base" /} 
{block name="resources"}
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/common.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/components.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/category.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/group_goods_list.css">
<script src="__TEMP__/{$style}/public/js/goods_list.js" type="text/javascript"></script>
<style>
.openList li dd {width: 90%;}
.openList li dl dt {font-size: 14px;width: 90%;height: 20px;overflow: hidden;}
.openList .goods-sales {font-size: 12px;}
.openList li dd i {font-size: 14px;}
.custom-search{width:90%;margin-left:20px;}
.custom-search .custom-search-input{width:97%;}
.custom-search-button{top:6px;}
</style>
{/block}
{block name="goodsHead"}
<section class="head">
	<a class="head_back" id="head_back"href="javascript:window.history.go(-1)"><i class="icon-back"></i></a>
	<div class="head-title">{include file='wap/default/Index/controlSearch'/}</div>
</section>
{/block}
{block name="main"}
<div id="index_content">
<!--列表页内容start-->
<section class="category-content-section">
	<section class="filtrate-term ">
		<ul>
			<li class="cur"><a href="javascript:void(0)">综合排序</a></li>
			<!--排序点击li标签增加样式cur；span标签增加样式active_down-->
			<li>
				<a href="javascript:void(0);" class="filtrate-sort">
					<em>排序</em>
					<span class="arrow_down arrow"></span>
				</a>
			</li>
		</ul>
	</section>
	<div class="mask-div"></div>
	<div class="filtrate-more hide sale-num">
		<span><a href="javascript:void(0)" data-sort="1" data-name="销量" class="">销量 </a></span>
		<span><a href="javascript:void(0)" data-sort="2" data-name="新品" class="">新品 </a></span>
		<span><a href="javascript:void(0)" data-sort="3" data-name="价格" class="">价格 </a></span>
		<input type="hidden" id='order' name="order"/>
		<input type="hidden" id='category_id' name='category_id' value="{$category_id}" />
	</div>
	<div class="goods-list-grid openList">
		<div class="blank-div"></div>
		<div id="goods_list">
			<div class="tablelist-append clearfix"></div>
		</div>
	</div>
</section>
</div>
{/block}
{block name="bottom"}{/block}
{block name="javascript"}
<script type="text/javascript">
$(function(){
	getgoodlist()
})
function getgoodlist(){
	$('#grouGoodsListmask').hide();
	$('.two-list-menu').hide();
	$('.two-list-menu li[pid]').hide();
	var order=$('.filtrate-more span a.current').attr('data-sort');
	var sort=$(".filtrate-more").find("input[name='order']").val();
	$.ajax({
		type:"post",
		url : "{:__URL('APP_MAIN/Goods/goodsList')}",
		data : {'category_id':'{$category_id}','brand_id':'{$brand_id}','order':order,'sort':sort },
		beforeSend:function(){
			showLoadMaskLayer();
		},
		success : function(data){
			var list_html="";
			for(var i=0;i<data['data'].length;i++){
				var item=data['data'][i];
				list_html+='<div class="product single_item info">'
							+'<li>'
								+'<div class="item">'
									+'<div class="item-tag-box">'
										+'<!--热卖icon位置为：0px 0px，新品icon位置为：0px -35px，精品icon位置：0px -70px-->'
									+'</div>'

									+'<div class="item-pic">'
										+'<a href="'+__URL('APP_MAIN/goods/goodsdetail?id='+item.goods_id)+'">'
											+'<img class="" src="__UPLOAD__/'+item.pic_cover_small+'" alt="'+item.goods_name+'" style="display: block;max-width:100%;max-height:100%;">'
										+'</a>'
									+'</div>'

									+'<dl>'
										+'<dt>'
											+'<a href="'+__URL('APP_MAIN/goods/goodsdetail?id='+item.goods_id)+'">'+item.goods_name+'</a>'
										+'</dt>'
										+'<dd>'
											+'<i>￥'+item.promotion_price+'</i>'
										+'</dd>'
									+'</dl>'
								+'</div>'

								+'<div class="item-con-info">'
									+'<span class="goods-sales"> 销量：'+item.sales+'</span>'
									+'<div class="cart-box">'
										+'<a class="add-cart increase" data-goods_id="575" href="javascript:CartGoodsInfo('+item.goods_id+','+item.state+')"></a>'
										+'<a class="decrease hide" data-goods_id="575" style="right: 60px;"></a>'
									+'</div>'
								+'</div>'
							+'</li>'
						+'</div>';
		}
		$('.tablelist-append').html(list_html);
		hiddenLoadMaskLayer();
	}
	});
}
</script>
<script type="text/javascript">
$("#head_back").click(function (){
    var json ={
            "center" : "2"
        }
    window.webkit.messageHandlers.center.postMessage(json);
})
</script>
{/block}